<template>
  <span>
    <vab-icon
      icon="brush-3-line"
      style="font-size: 20px"
      title="清除缓存"
      @click="clearCache"
    />
  </span>
</template>

<script>
  export default {
    name: 'VabClearCache',
    data() {
      return {
        state: '',
        timeout: null,
      }
    },
    methods: {
      clearCache() {
        this.$baseConfirm('确定要清除缓存吗？', '温馨提示', () => {
          this.$store.dispatch('dict/getPRecoverReason')
          this.$store.dispatch('dict/getPRollbackReason')
          this.$store.dispatch('dict/getPOutboundReason')
          this.$store.dispatch('dict/getTAdrsStep')
          this.$store.dispatch('dict/getDictAbo')
          this.$store.dispatch('dict/getDictProduct')
          this.$store.dispatch('dict/getDictSAbo')
          this.$store.dispatch('dict/getDictSProduct')
          this.$store.dispatch('dict/getDictSFrom')
          this.$store.dispatch('dict/getHisDept')
          this.$store.dispatch('dict/getDictExam')
          this.$store.dispatch('dict/getDictAPurpose')
          this.$store.dispatch('dict/getDictASuperIndi')
          this.$store.dispatch('dict/getDictOThreshold')
          this.$store.dispatch('dict/getDictMType')
          this.$store.dispatch('dict/getOSet')

          setTimeout(() => {
            this.$baseMessage('清除成功', 'success', 'vab-hey-message-success')
            // this.$baseEventBus.$emit('reload-router-view')
          }, 4000)
        })
      },
    },
  }
</script>

<style lang="scss" scoped></style>
